﻿Public Class EndControl
    Sub New(ByVal Score As Integer, ByVal TotalQuestions As Integer)
        InitializeComponent()
        ScoreLabel.Text = String.Format(ScoreLabel.Text, Score, TotalQuestions)
        If SingleGameOnly Then
            PlayAgainButton.Visible = False
            ReturnButton.Visible = False
        End If
    End Sub

    Private Sub PlayAgainButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlayAgainButton.Click
        MainForm.PlayAgain()
    End Sub

    Private Sub ReturnButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReturnButton.Click
        MainForm.ReturnToLobby()
        MainForm.SetStatus("")
        MainForm.SetStatus("----------")
        MainForm.SetStatus("")
        MainForm.SetStatus("Returned to Lobby")
        MainForm.SetStatus("")
    End Sub
End Class
